package com.xhtt.modules.task.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author feipc
 * @since 2019-06-13
 */
@Data
public class TaskPotSeo {

    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    @TableField(exist = false)
    private String date;

    private String exportPot;

    private String importPot;

    private String productName;

    private Integer planStatus;
    @TableField(exist = false)
    private Integer planStatusName;

    private Integer hoseTeamId;
    private String hoseTeamName;

    private Integer ccrTeamId;
    private String ccrTeamName;

    private Integer ballTeamId;
    private String ballTeamName;
    @TableField(exist = false)
    private String teamName;//整合去重的teamName

    private Integer hoseStatus;
    @TableField(exist = false)
    private String hoseStatusName;//中文状态

    private LocalDateTime hosePlanStartTime;

    private LocalDateTime hoseStartTime;
    @TableField(exist = false)
    private int hoseStartTimeIfWarn;

    private LocalDateTime hoseFinishTime;
    @TableField(exist = false)
    private int hoseFinishTimeIfWarn;

    private Integer ballStatus;
    @TableField(exist = false)
    private String ballStatusName;//中文状态

    private Integer ccrStatus;
    @TableField(exist = false)
    private String ccrStatusName;//中文状态

    private LocalDateTime planStartDate;

    private LocalDateTime ballPlanStartTime;

    private LocalDateTime ballStartTime;
    @TableField(exist = false)
    private int ballStartTimeIfWarn;

    private LocalDateTime ballFinishTime;
    @TableField(exist = false)
    private int ballFinishTimeIfWarn;

    public String getHoseStatusName() {
        if (null != hoseStatus && hoseStatus.intValue() == 10) {
            return "已完成";
        }
        return "";
    }

    public String getBallStatusName() {
        if (null != ballStatus && ballStatus.intValue() == 10) {
            return "已完成";
        }
        return "";
    }

    public String getCcrStatusName() {
        if (null != ccrStatus && ccrStatus.intValue() == 10) {
            return "已完成";
        }
        return "";
    }

    public String getPlanStatusName() {
        if (null != planStatus && planStatus.intValue() == 10) {
            return "已完成";
        }
        return "";
    }
}
